home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2005 Utilities / CHIP Utilities 2005.7z / CHIP Utilities 2005.iso / CHIP Utilities / Zarzadzanie i bezpieczenstwo systemu / MBSA / MBSASetup-EN.msi / Data.Cab / copyreportlist.xsl < prev    next >
Extensible Markup Language  |  2004-08-13  |  1KB  |  49 lines

  1. <?xml version="1.0"?> 
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4.     <xsl:variable name="Assessment">
  5.       <c score="1" text="Incomplete Scan"/>
  6.       <c score="2" text="Severe Risk"/>
  7.       <c score="3" text="Potential Risk"/>
  8.       <c score="4" text="Security FYIs"/>
  9.       <c score="5" text="Strong Security"/>
  10.     </xsl:variable>
  11.     <xsl:template match="/">
  12.         <table border="0" cellpadding="0" cellspacing="0" width="100%">
  13.             <tr class="ReportListHeader">
  14.                 <td><B>Computer Name</B></td>
  15.                 <td><B>IP Address</B></td>
  16.                 <td><B>Assessment</B></td>
  17.                 <td><B>Scan Date</B></td>
  18.             </tr>
  19.             <xsl:for-each select="Reports">
  20.                 <xsl:apply-templates>
  21.                     <xsl:sort order="sortorder" select="sortfield"/>
  22.                 </xsl:apply-templates>
  23.             </xsl:for-each>
  24.         </table>
  25.     </xsl:template>
  26.     
  27.     <xsl:template match="Report">
  28.         <xsl:param name="score" select="@grade"/>
  29.     
  30.         <tr>
  31.             <td><xsl:value-of select="@computer"/></td>
  32.             <td><xsl:value-of select="@ip"/></td>
  33.             <td><xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$score]/@text"/></td>
  34.             <td>
  35.              <xsl:choose>
  36.               <xsl:when test="@ldate">
  37.                 <xsl:value-of select="@ldate"/>
  38.               </xsl:when>
  39.               <xsl:otherwise>
  40.                 <xsl:value-of select="@date"/>
  41.               </xsl:otherwise>
  42.              </xsl:choose>        
  43.             </td>
  44.         </tr>
  45.         
  46.     </xsl:template>
  47.     
  48. </xsl:stylesheet>
  49.